package com.app.xinfadi.base.status;

/**
 * function:
 * Created by Wutengfei on 2016/2/2.
 */
public enum PurchasePlanRoleStatus {
    S11("已上报", "01"), S12("撤回", "02"), S13("完成", "03"), S14("部分完成", "04"), S15("未完成", "05"),
    S21("待审核", "11"), S22("撤回", "12"), S23("关闭", "13"),
    S31("已下达", "21"), S32("终止", "23"), S33("不通过", "22");
    //产品  已上报|待审核|已下达|已关闭|已完成
    //      待审核|已下达|已关闭|已完成
    //中心  待审批01|已审批11
    //      待审核11|已下达21|已关闭13|已完成03
    //领导  待处理11|执行中21|已完成03

//    中心




//领导

    private String name;
    private String statusCode;

    // 构造方法
    PurchasePlanRoleStatus(String name, String statusCode) {
        this.name = name;
        this.statusCode = statusCode;
    }

    public String getName(String statusCode) {
        for (PurchasePlanRoleStatus c : values()) {
            if (c.getStatusCode().equals(statusCode)) {
                return c.name;
            }
        }
        return name;
    }

    public String getName() {
        return name;
    }

    public String getStatusCode() {
        return statusCode;
    }
}
